package renderer {  
  
    import flash.events.MouseEvent;
    
    import mx.collections.*;
    import mx.controls.Label;
    import mx.controls.treeClasses.*;  
      
    public class MyTreeItemRenderer extends TreeItemRenderer {  
          
        private var editImg:Label;  
          
        [Embed(source="../assets/icon/edit.gif")] 
        private var editIcon:Class;  
      
        public function MyTreeItemRenderer() {  
            super();
        }  
          
        override protected function createChildren():void {  
                super.createChildren();  
                  
                editImg = new Label();  
                editImg.text = 'TOTOTOTOTO'; 
                addChild(editImg);    
        }  
          
        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {  
            super.updateDisplayList(unscaledWidth, unscaledHeight);  
              
            if (super.data) {  
                editImg.x = deleteImg.x + deleteImg.width + 2;  
                editImg.buttonMode = true;  
                editImg.useHandCursor = true;  
                editImg.addEventListener(MouseEvent.CLICK,onEditClick);       
            }  
        }  
          
        private function onEditClick(evt:MouseEvent):void {  
        }  
          
    }  
}  